home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / CDTools / MUIRexx / demos / MUIRexxDock / dock_object.rexx < prev    next >
OS/2 REXX Batch file  |  1997-05-02  |  2KB  |  58 lines

  1. /* */
  2. options results
  3. options failat 20
  4. parse arg m' 'n
  5.  
  6. address dock
  7.  
  8. MUIA_Frame = 0x8042ac64
  9. MUIA_Group_Spacing = 0x8042866d
  10. MUIA_InputMode = 0x8042fb04
  11.  
  12. MUIV_Frame_None = 0
  13. MUIV_InputMode_RelVerify = 1
  14.  
  15. if (m ~= 0) & (n = 0) then do
  16.     getvar 'D'||m
  17.     n = result
  18.     i = 1
  19. end
  20. else i = n
  21.  
  22. do j = i to n
  23.     getvar 'B'||m||j
  24.     entry = result
  25.     if entry ~= '' then do
  26.         parse var entry type' ICON "'obj'"'
  27.         if lastpos('/',obj) ~= 0 then objname = substr(obj,lastpos('/',obj)+1)
  28.         else objname = substr(obj,lastpos(':',obj)+1)
  29.         if m = 0 then type = 'button'
  30.         gattrs = MUIA_Frame MUIV_Frame_None
  31.         group ID 'G'||m||j
  32.           if exists(objname'.add') then do
  33.             call open('add',objname'.add','R')
  34.             do while ~eof('add')
  35.                 line = readln('add')
  36.                 if line ~= '' then interpret line
  37.             end
  38.             call close('add')
  39.           end
  40.           select
  41.             when type = 'pop' then do
  42.                 group ID m||j POP ICON '"'obj'"' ATTRS MUIA_Frame 0 MUIA_Group_Spacing 0 LABEL j||' '||obj
  43.                 call open('pop',objname'.pop','R')
  44.                 do while ~eof('pop')
  45.                     line = readln('pop')
  46.                     if line ~= '' then interpret line
  47.                 end
  48.                 call close('pop')
  49.                 endgroup
  50.             end
  51.             otherwise do
  52.                 type ID m||j ICON '"'obj'"' ATTRS gattrs LABEL j||' '||obj
  53.             end
  54.           end
  55.         endgroup
  56.     end
  57. end
  58.